package com.example.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LogController {

    private static final Logger LOG = LoggerFactory.getLogger(LogController.class);

    @RequestMapping("/getLog")
    public String getLog() {
        LOG.info("我的第一句日志controller");
        return "log";
    }

    @RequestMapping("/getLogError")
    public String getLogError() {
        LOG.error("我的第一句日志error");
        return "log";
    }
}
